<%@ include file="/common/taglibs.jsp"%>

<title><fmt:message key="personalRestDetail.title"/></title>
<content tag="heading"><fmt:message key="personalRestDetail.heading"/></content>

<html:form action="savePersonalRest" method="post" styleId="personalRestForm" onsubmit="return validatePersonalRestForm(this)">
<ul>

<html:hidden property="id"/>

    <li>
        <generalsetting:label styleClass="desc" key="personalRestForm.empNo"/>
        <html:errors property="empNo"/>
        <html:text property="empNo" styleId="empNo" styleClass="text medium"/>

    </li>

    <li>
        <generalsetting:label styleClass="desc" key="personalRestForm.restId"/>
        <!-- html:errors property="restId"/-->
        <!-- html:text property="restId" styleId="restId" styleClass="text medium"/-->
            <html:select property="restId" onchange="">
            	<html:options collection="rests" property="restId" labelProperty="restName"/>
            </html:select>
    </li>

    <li>
        <generalsetting:label styleClass="desc" key="personalRestForm.restHours"/>
        <html:errors property="restHours"/>
        <html:text property="restHours" styleId="restHours" styleClass="text medium"/>

    </li>

    <li>
        <generalsetting:label styleClass="desc" key="personalRestForm.restDays"/>
        <html:errors property="restDays"/>
        <html:text property="restDays" styleId="restDays" styleClass="text medium"/>

    </li>

    <li>
        <generalsetting:label styleClass="desc" key="personalRestForm.startTime"/>
        <html:errors property="startTime"/>
        <html:text property="startTime" styleId="startTime" styleClass="text medium"/>
            <A HREF="#" onclick="cal1.select(document.forms[0].startTime,'anchor1','yyyy/MM/dd');return false;"
                     title = "cal1.select(document.forms[0].startTime, 'anchor1', 'yyyy/MM/dd'); return false;"
                     id="anchor1" name="anchor1">                
            <fmt:message key="button.calendar"/>            
            </A> 
    </li>

    <li>
        <generalsetting:label styleClass="desc" key="personalRestForm.endTime"/>
        <html:errors property="endTime"/>
        <html:text property="endTime" styleId="endTime" styleClass="text medium"/>
            <A HREF="#" onclick="cal1.select(document.forms[0].endTime,'anchor2','yyyy/MM/dd');return false;"
                     title = "cal1.select(document.forms[0].endTime, 'anchor2', 'yyyy/MM/dd'); return false;"
                     id="anchor2" name="anchor2">                
            <fmt:message key="button.calendar"/>            
            </A> 
    </li>

    <li>
        <generalsetting:label styleClass="desc" key="personalRestForm.restTimeTotal"/>
        <html:errors property="restTimeTotal"/>
        <html:text property="restTimeTotal" styleId="restTimeTotal" styleClass="text medium"/>

    </li>

    <li>
        <generalsetting:label styleClass="desc" key="personalRestForm.restTimeApplied"/>
        <html:errors property="restTimeApplied"/>
        <html:text property="restTimeApplied" styleId="restTimeApplied" styleClass="text medium"/>

    </li>

    <li class="buttonBar bottom">
        <html:submit styleClass="button" property="method.save" onclick="bCancel=false">
            <fmt:message key="button.save"/>
        </html:submit>

        <html:submit styleClass="button" property="method.delete" onclick="bCancel=true; return confirmDelete('PersonalRest')">
            <fmt:message key="button.delete"/>
        </html:submit>

        <html:cancel styleClass="button" onclick="bCancel=true">
            <fmt:message key="button.cancel"/>
        </html:cancel>
    </li>
</ul>
</html:form>
<SCRIPT LANGUAGE="JavaScript" SRC="scripts/CalendarPopup.js"></SCRIPT>
<script type="text/javascript">
    var cal1 = new CalendarPopup();
    Form.focusFirstElement($("personalRestForm"));
</script>

<html:javascript formName="personalRestForm" cdata="false" dynamicJavascript="true" staticJavascript="false"/>
<script type="text/javascript" src="<html:rewrite page="/scripts/validator.jsp"/>"></script>
